package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc AchievementDockDto
 * @使用场景
 */
@Data
public class AchievementDockDto extends BaseDto implements Serializable {

    /**
     * 关联成果ID
     */
    @ApiModelProperty("关联成果ID")
    private String achievementId;

    /**
     * 成果类型名称
     */
    @ApiModelProperty("成果类型名称")
    private String achievementTypeName;

    /**
     * 成果类别名称
     */
    @ApiModelProperty("成果类别名称")
    private String achievementCategoryName;

    /**
     * 成果等级名称
     */
    @ApiModelProperty("成果等级名称")
    private String achievementGradeName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AchievementDockDto that = (AchievementDockDto) o;
        return (
                achievementId == that.achievementId &&
                        achievementTypeName == that.achievementTypeName &&
                        achievementCategoryName == that.achievementCategoryName &&
                        achievementGradeName == that.achievementGradeName
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                achievementId,
                achievementTypeName,
                achievementCategoryName,
                achievementGradeName
        );
    }

}
